/*
 * Copyright (c) 2015 www.smarthome.com All rights reserved.
 * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
 */
package com.smarthome.base.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.smarthome.base.dao.ShUserRoleResourceDao;
import com.smarthome.base.dao.base.BaseDaoImpl;
import com.smarthome.domain.bean.ShUserRoleResource;

/**
 * ShUserRoleResourceDao 实现类
 * @author KongXiangyu
 * @since 2015-09-07
 */
@Repository("shUserRoleResourceDao")
public class ShUserRoleResourceDaoImpl extends BaseDaoImpl<ShUserRoleResource,Long> implements ShUserRoleResourceDao {
	private final static String NAMESPACE = "com.smarthome.base.dao.ShUserRoleResourceDao.";
	
	//返回本DAO命名空间,并添加statement
	public String getNameSpace(String statement) {
		return NAMESPACE + statement;
	}

	/* (non-Javadoc)
	 * @see com.smarthome.base.dao.ShUserRoleResourceDao#deleteByUserRoleId(java.lang.Long)
	 */
	@Override
	public int deleteByUserRoleId(Long  ...roleId) {
		// TODO Auto-generated method stub
		return this.delete(getNameSpace("deleteByRoleId"), roleId);
	}

	@Override
	public List<ShUserRoleResource> selectEntryListByRoleId(Long... roleId) {
		return this.selectList(getNameSpace("selectByRoleId"), roleId);
	}
		
}